package com.huaiwei.usmManager.common.utils;

import org.apache.commons.lang.StringUtils;

public class NumberUtils {
    public static Integer obj2Integer(Object value){
        if(value!=null){
            return StringUtils.isNotEmpty(value.toString())?Integer.parseInt(value.toString()):null;
        }
        return null;
    }

    public static Double obj2Double(Object value){
        if(value!=null){
            return StringUtils.isNotEmpty(value.toString())?Double.parseDouble(value.toString()):null;
        }
        return null;
    }
}
